<?php /* Smarty version Smarty-3.1.12, created on 2013-03-16 16:49:06
         compiled from "/www/htdocs/w00fc40b/dota2league/templates/lastMatches/index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1975081743511524027197c5-93391323%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'af9e91dcdb52b5231e9a71c4b0158c7e0da6993f' => 
    array (
      0 => '/www/htdocs/w00fc40b/dota2league/templates/lastMatches/index.tpl',
      1 => 1363448944,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1975081743511524027197c5-93391323',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_511524027408e5_52146650',
  'variables' => 
  array (
    'userData' => 0,
    'lastMatches' => 0,
    'v' => 0,
    'statusClass' => 0,
    'result' => 0,
    'team' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_511524027408e5_52146650')) {function content_511524027408e5_52146650($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include '/www/htdocs/w00fc40b/dota2league/Smarty/plugins/modifier.date_format.php';
?><div class="page-header">
	<h1>Last Matches <small>of <img src="<?php echo $_smarty_tpl->tpl_vars['userData']->value['Avatar'];?>
"> <?php echo $_smarty_tpl->tpl_vars['userData']->value['Name'];?>
</small></h1>
</div>


<?php if (count($_smarty_tpl->tpl_vars['lastMatches']->value)>0&&is_array($_smarty_tpl->tpl_vars['lastMatches']->value)){?>
	<table  id="lastMatchesTable" class="table table-striped" cellpadding="0" cellspacing="0" border="0">
		<thead>
			<tr align="center">
				<th></th>
				<th>Date</th>
				<th>Result</th>
				<th>MatchID</th>
				<th>Mode</th>
				<th>Team</th>
			</tr>
		</thead>
		
		<tbody>
		  <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['lastMatches']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
			<?php if ($_smarty_tpl->tpl_vars['v']->value['TeamID']==1){?>
				<?php $_smarty_tpl->tpl_vars["team"] = new Smarty_variable('The Radiant', null, 0);?>
			<?php }else{ ?>
				<?php $_smarty_tpl->tpl_vars["team"] = new Smarty_variable('The Dire', null, 0);?>
			<?php }?>
		  	
		  	<?php if ($_smarty_tpl->tpl_vars['v']->value['TeamWonID']==$_smarty_tpl->tpl_vars['v']->value['TeamID']){?>
		  		<?php $_smarty_tpl->tpl_vars["statusClass"] = new Smarty_variable('success', null, 0);?>
		  		<?php $_smarty_tpl->tpl_vars["result"] = new Smarty_variable('won', null, 0);?>
		  	<?php }else{ ?>
		  		<?php if ($_smarty_tpl->tpl_vars['v']->value['Canceled']==1){?>
		  			<?php $_smarty_tpl->tpl_vars["statusClass"] = new Smarty_variable('important', null, 0);?>
		  			<?php $_smarty_tpl->tpl_vars["result"] = new Smarty_variable('<i class="icon-remove t" title="Match canceled"></i>', null, 0);?>
		  		<?php }else{ ?>
		  			<?php $_smarty_tpl->tpl_vars["statusClass"] = new Smarty_variable('important', null, 0);?>
		  			<?php $_smarty_tpl->tpl_vars["result"] = new Smarty_variable('lost', null, 0);?>
		  		<?php }?>
		  	<?php }?>
		  	
		  	<tr>
				<td><?php echo $_smarty_tpl->getSubTemplate ("prototypes/matchTypeIcon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('MatchTypeID'=>((string)$_smarty_tpl->tpl_vars['v']->value['MatchTypeID'])), 0);?>
</td>
				<td><span class="timeago" title="<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['v']->value['TimestampClosed'],'%Y-%m-%d %H:%M:%S');?>
"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['v']->value['TimestampClosed'],'%Y-%m-%d %H:%M:%S');?>
</span></td>
				<td><span class="label label-<?php echo $_smarty_tpl->tpl_vars['statusClass']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['result']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['v']->value['EloChange'];?>
</span><?php echo $_smarty_tpl->getSubTemplate ("prototypes/leaverIcon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('width'=>"16",'leaver'=>$_smarty_tpl->tpl_vars['v']->value['Leaver']), 0);?>
</td>
				<td><a href="match.php?matchID=<?php echo $_smarty_tpl->tpl_vars['v']->value['MatchID'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['MatchID'];?>
</a></td>
				<td><?php echo $_smarty_tpl->tpl_vars['v']->value['MatchMode'];?>
&nbsp;<span class="t" title="<?php echo $_smarty_tpl->tpl_vars['v']->value['MatchMode'];?>
">(<?php echo $_smarty_tpl->tpl_vars['v']->value['MatchModeShortcut'];?>
)</span></td>
				<td><?php echo $_smarty_tpl->tpl_vars['team']->value;?>
</td>
			</tr>
		  <?php } ?>
		</tbody>
	</table>
<?php }else{ ?>
	no Matches found
<?php }?>
<?php }} ?>